package com.lhn.bbs.mapper;

import com.lhn.bbs.entity.Reply;
import com.lhn.bbs.entity.ReplyExample;
import java.util.List;

import com.lhn.bbs.vo.ReplyAddVo;
import com.lhn.bbs.vo.ReplyThemeVo;
import org.apache.ibatis.annotations.Param;

public interface ReplyDao {
    long countByExample(ReplyExample example);

    int deleteByExample(ReplyExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Reply record);

    int insertSelective(Reply record);

    List<Reply> selectByExample(ReplyExample example);

    Reply selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Reply record, @Param("example") ReplyExample example);

    int updateByExample(@Param("record") Reply record, @Param("example") ReplyExample example);

    int updateByPrimaryKeySelective(Reply record);

    int updateByPrimaryKey(Reply record);

    int findcount(Integer themeid);
//  添加主题帖
    long saveReply(ReplyAddVo replyAddVo);

    /**
     * 查询我的回复帖
     * @param userid
     * @return
     */
    List<ReplyThemeVo> findReplyByToid(Integer userid);

    // 查询我的回复帖的数量
    Integer findReplyCountByUserid(Integer userid);

    // 根据id删除reply表中的内容
    Boolean deleteByIdReply(Integer replyid);
}